/**
 * 截取导航数据 /gcps-cusweb/account/mine ==>/gcps-cusweb/account
 */

export const CaptureNavigationBar = (str, cha, num) => {
  let x = str.indexOf(cha);
  for (let i = 0; i < num; i++) {
    x = str.indexOf(cha, x + 1);
  }
  return str.substring(0, x);
};
